package setting

import (
	"gopkg.in/ini.v1"
	"time"
)

var RpcMaxMessageSize int
var RpcSendTimeout time.Duration

func initRpc(config *ini.File) error {
	section := config.Section("rpc")
	RpcMaxMessageSize = section.Key("max_message_size").MustInt(30 * 1024 * 1024)
	RpcSendTimeout = time.Duration(section.Key("send_timeout").MustInt(10)) * time.Second
	return nil
}
